home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audiofile / AFidentifyfd.z / AFidentifyfd
Encoding:
Text File  |  1998-10-20  |  11.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4. aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD((((3333ddddmmmm))))                                            aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afIdentifyFD, afIdentifyNamedFD, afGetFileFormat, AFgetfilefmt - retrieve
  10.      the audio file format of a file descriptor / open AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  14.  
  15.      iiiinnnntttt aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD((((iiiinnnntttt ffffdddd))))
  16.  
  17.      iiiinnnntttt aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyNNNNaaaammmmeeeeddddFFFFDDDD((((iiiinnnntttt ffffdddd,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr**** ffffiiiilllleeeennnnaaaammmmeeee,,,,
  18.                            iiiinnnntttt**** iiiimmmmpppplllleeeemmmmeeeennnntttteeeedddd))))
  19.  
  20.      iiiinnnntttt aaaaffffGGGGeeeettttFFFFiiiilllleeeeFFFFoooorrrrmmmmaaaatttt((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ****vvvveeeerrrrssss))))
  21.  
  22. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  23.      _f_d            is a Unix file descriptor returned by a call to ooooppppeeeennnn(2) or
  24.                    its equivalent.
  25.  
  26.      _f_i_l_e_n_a_m_e      is the full pathname of the file whose fd was passed as the
  27.                    first argument.
  28.  
  29.      _i_m_p_l_e_m_e_n_t_e_d   is a pointer to integer which will have its value set to 0
  30.                    or 1 by aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyNNNNaaaammmmeeeeddddFFFFDDDD(((()))).
  31.  
  32.      _f_i_l_e          is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure, previously created by a call
  33.                    to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm).
  34.  
  35.      _v_e_r_s          is used to return a file format version number.  The AIFF-C
  36.                    format includes a file chunk which contains a version
  37.                    number.  AIFF does not contain a version number, so for
  38.                    AIFF files, the value returned here is 0.  If _v_e_r_s is a
  39.                    null pointer, it is ignored.
  40.  
  41. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  42.      aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD(((()))) and aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyNNNNaaaammmmeeeeddddFFFFDDDD(((()))) return a positive value indicates
  43.      that _f_d's file format is supported by the Audio File Library.  A negative
  44.      return value indicates an unsupported or unrecognized audio file format.
  45.      aaaaffffGGGGeeeettttFFFFiiiilllleeeeFFFFoooorrrrmmmmaaaatttt(((()))) returns the format of the file represented by the _f_i_l_e
  46.      handle.  It will return -1 only if the handle is bad.
  47.  
  48. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  49.      aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD(((()))) and aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyNNNNaaaammmmeeeeddddFFFFDDDD(((()))) return a symbolic integer constant
  50.      which denotes the audio file format associated with _f_d.
  51.      aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyNNNNaaaammmmeeeeddddFFFFDDDD(((()))) sets the value of *_i_m_p_l_e_m_e_n_t_e_d to 1 if the format was
  52.      both recognized and is supported (i.e., can be read and written) and 0 if
  53.      the file is either recognized but not supported or unrecognized.  This
  54.      allows applications to distinguish filetypes regardless of their support
  55.      with the Audio File Library.  If _i_m_p_l_e_m_e_n_t_e_d is a null pointer, it will
  56.      be ignored.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD((((3333ddddmmmm))))                                            aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyNNNNaaaammmmeeeeddddFFFFDDDD(((()))) is provided for cases in which the desired audio
  75.      files may exist as two or more files separated into resource and data
  76.      files (plus possible ancillary data) as is the case with Sound Designer 2
  77.      files.  For such cases, this routine must be used and supplied with the
  78.      original pathname to the file in order for the routine to properly
  79.      identify this filetype and other future types like it.  This routine may
  80.      be used in place of aaaaffffIIIIddddeeeennnnttttiiiittttyyyyFFFFDDDD in all cases where a file pathname is
  81.      available.  Note that it is possible to identify audio formats which are
  82.      not readable by the library.
  83.  
  84.      aaaaffffGGGGeeeettttFFFFiiiilllleeeeFFFFoooorrrrmmmmaaaatttt(((()))) returns a symbolic integer constant which denotes the
  85.      audio file format in the file handle structure.  The _v_e_r_s parameter can
  86.      be used to obtain additional information about the file format.  For
  87.      example, for AIFF-C _v_e_r_s contains a long integer AIFF-C version number.
  88.  
  89. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  90.      All three routines return a symbolic integer constant which indicates the
  91.      format of the audio file. Current possible file format values (defined in
  92.      <dmedia/audiofile.h>):
  93.  
  94.      AAAAFFFF____FFFFIIIILLLLEEEE____AAAAIIIIFFFFFFFFCCCC            extended Audio Interchange File Format (AIFF-C)
  95.  
  96.      AAAAFFFF____FFFFIIIILLLLEEEE____AAAAIIIIFFFFFFFF             Audio Interchange File Format (AIFF)
  97.  
  98.      AAAAFFFF____FFFFIIIILLLLEEEE____NNNNEEEEXXXXTTTTSSSSNNNNDDDD          NeXT .snd and Sun .au
  99.  
  100.      AAAAFFFF____FFFFIIIILLLLEEEE____WWWWAAAAVVVVEEEE             Waveform Audio File Format (RIFF)
  101.  
  102.      AAAAFFFF____FFFFIIIILLLLEEEE____BBBBIIIICCCCSSSSFFFF            Berkeley/IRCAM/CARL Sound File format
  103.  
  104.      AAAAFFFF____FFFFIIIILLLLEEEE____MMMMPPPPEEEEGGGG1111BBBBIIIITTTTSSSSTTTTRRRREEEEAAAAMMMM   MPEG-1 Audio Bitstream encoded data
  105.  
  106.      AAAAFFFF____FFFFIIIILLLLEEEE____SSSSOOOOUUUUNNNNDDDDEEEESSSSIIIIGGGGNNNNEEEERRRR1111    Sound Designer File Format I (not supported)
  107.  
  108.      AAAAFFFF____FFFFIIIILLLLEEEE____SSSSOOOOUUUUNNNNDDDDEEEESSSSIIIIGGGGNNNNEEEERRRR2222    Sound Designer File Format II
  109.  
  110.      AAAAFFFF____FFFFIIIILLLLEEEE____AAAAVVVVRRRR              Audio Visual Research File Format
  111.  
  112.      AAAAFFFF____FFFFIIIILLLLEEEE____IIIIFFFFFFFF____8888SSSSVVVVXXXX         Amiga IFF/8SVX File Format
  113.  
  114.      AAAAFFFF____FFFFIIIILLLLEEEE____VVVVOOOOCCCC              Creative Labs VOC File Format
  115.  
  116.      AAAAFFFF____FFFFIIIILLLLEEEE____SSSSAAAAMMMMPPPPLLLLEEEEVVVVIIIISSSSIIIIOOOONNNN     Sample Vision File Format
  117.  
  118.      AAAAFFFF____FFFFIIIILLLLEEEE____SSSSOOOOUUUUNNNNDDDDFFFFOOOONNNNTTTT2222       Creative Labs SoundFont2 (tm) File Format
  119.  
  120.      AAAAFFFF____FFFFIIIILLLLEEEE____NNNNIIIISSSSTTTT____SSSSPPPPHHHHEEEERRRREEEE      NIST SPHERE File Format (not supported)
  121.  
  122.      AAAAFFFF____FFFFIIIILLLLEEEE____UUUUNNNNKKKKNNNNOOOOWWWWNNNN          Unrecognized file format
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD((((3333ddddmmmm))))                                            aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyFFFFDDDD((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140.      Note that these are by no means all of the possible return values for
  141.      this function.  The AF is a library which will continue to support new
  142.      file formats.  As the Audio File Library is a Dynamic Shared Object
  143.      (DSO), it is possible for this function to return a token not found in
  144.      <audiofile.h>.  In addition, other future file formats may contain a
  145.      version number which will be returned in _v_e_r_s.
  146.  
  147. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  148.      aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyNNNNaaaammmmeeeeddddFFFFDDDD(((()))) represents a special case within the Audio File
  149.      Library routines in that it will attempt to open files other than the one
  150.      passed in via _f_d.  Because the names of these other files vary with the
  151.      file system, this access is done by the library rather than by the
  152.      application to make the operation transparent to the user.  In the event
  153.      that these files exist but are not readable, aaaaffffIIIIddddeeeennnnttttiiiiffffyyyyNNNNaaaammmmeeeeddddFFFFDDDD(((()))) will
  154.      return AAAAFFFF____FFFFIIIILLLLEEEE____UUUUNNNNKKKKNNNNOOOOWWWWNNNN (assuming the file did not match any other format)
  155.      and oooosssseeeerrrrrrrroooorrrr(3C) will be set to the appropriate error value.
  156.  
  157. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  158.      aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm), aaaaffffGGGGeeeettttFFFFiiiilllleeeeFFFFoooorrrrmmmmaaaatttt(3dm), aaaaffffOOOOppppeeeennnnNNNNaaaammmmeeeeddddFFFFDDDD(3dm)
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.